﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MySpace.Data;
/// <summary>
///WebTable 封装Web数据表
/// </summary>
namespace DataBaseTable
{
    public class WebTable : DBTable
    {
        private const string tableName="web";//表名
        /// <summary>
        /// 实例构造函数
        /// </summary>
        public WebTable():base(GetHandler.Init(), tableName)
        {
            this.Filter = "id=1";
            this.GetRow();
        }
        /// <summary>
        /// 网站名称
        /// </summary>
        public string WebName
        {
            get
            {
                try { return (string)this.DataRow["Web_Name"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["Web_Name"] = value;
            }
        }
        

        /// <summary>
        /// 网站关键字
        /// </summary>
        public string Keyword
        {
            get
            {
                try { return (string)this.DataRow["Keyword"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["Keyword"] = value;
            }
        }
        /// <summary>
        /// 网站简单描述
        /// </summary>
        public string Description
        {
            get
            {
                try { return (string)this.DataRow["Description"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["Description"] = value;
            }
        }        
        /// <summary>
        /// 历史访问数
        /// </summary>
        public int Hits
        {
            get
            {
                try { return (int)this.DataRow["Hits"]; }
                catch { return 0; }
            }
            set
            {
                this.DataRow["Hits"] = value;
            }
        }
        /// <summary>
        /// 备案信息
        /// </summary>
        public string BeiAn
        {
            get
            {
                try { return (string)this.DataRow["BeiAn"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["BeiAn"] = value;
            }
        }
        /// <summary>
        /// 学校网站
        /// </summary>
        public string Email
        {
            get
            {
                try { return (string)this.DataRow["Email"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["Email"] = value;
            }
        }
        /// <summary>
        /// 网站底部信息
        /// </summary>
        public string BottomText
        {
            get
            {
                try { return (string)this.DataRow["BottomText"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["BottomText"] = value;
            }
        }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string Phone
        {
            get
            {
                try { return (string)this.DataRow["Phone"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["Phone"] = value;
            }
        }
        /// <summary>
        /// 第三方统计代码
        /// </summary>
        public string OutHits
        {
            get
            {
                try { return (string)this.DataRow["OutHits"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["OutHits"] = value;
            }
        } 
        /// <summary>
        /// 地址
        /// </summary>
        public string Address
        {
            get
            {
                try { return (string)this.DataRow["Address"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["Address"] = value;
            }
        }

    }
}